{menuList} <br>
<span id="hktime"></span>，<span id="countdownstr"></span>
<form method="post" onsubmit="return chkform(this)" action="op.php?op=agent&fp=bnow36a">
  <input type="hidden" name="maxnt21" value={money21}>
  <input type="hidden" name="maxnt31" value={money31}>
  <input type="hidden" name="maxnt41" value={money41}>
  <input type="hidden" name="maxnt22" value={money22}>
  <input type="hidden" name="maxnt32" value={money32}>
  <input type="hidden" name="maxnt42" value={money42}>
  <table cellSpacing="1" cellPadding="3" width="900" border="0" bgcolor="#5A79C6">
    <tr bgcolor="#c0d6eb">
      <td bgcolor="#c0d6eb" height="28" width="4%" align="center">类别</td>
      <td align="center" bgcolor="#e7ebef" height="28" width="16%"><input type="radio" name="subid" value=21>
        二尾</td>
      <td align="center" bgcolor="#e7ebef" height="28" width="16%"><input type="radio" name="subid" value=31>
        三尾</td>
      <td align="center" bgcolor="#e7ebef" height="28" width="16%"><input type="radio" name="subid" value=41>
        四尾</td>
      <td align="center" bgcolor="#e7ebef" height="28" width="16%"><input type="radio" name="subid" value=51>
        五尾</td>
    </tr>
  </table>
  <table cellSpacing="1" cellPadding="3" width="900" border="0" bgcolor="#5A79C6">
    <tr bgcolor="#c0d6eb">
      <td bgcolor="#c0d6eb" height="28" width="4%" align="center">赔率</td>
      <td align="center" bgcolor="#e7ebef" height="28" width="16%"> {r36_21}</td>
      <td align="center" bgcolor="#e7ebef" height="28" width="16%"> {r36_31}</td>
      <td align="center" bgcolor="#e7ebef" height="28" width="16%"> {r36_41}</td>
		<td align="center" bgcolor="#e7ebef" height="28" width="16%"> {r36_51}</td>
    </tr>
  </table>
  <table cellSpacing="1" cellPadding="3" width="900" border="0" bgcolor="#5A79C6">
    <tr>
      <td bgcolor="#c0d6eb" height="28" width="4%" align="center">注额</td>
      <td align="center" bgcolor="#ffffff" height="28" width="16%"><a href="op.php?op=agent&fp=betlist1&dt1={dt}&dt2={dt}&bettype=36&page=-1&order=2&numbers=21">{money21}</a>&#12288;(&nbsp;{win21}&nbsp;)</td>
      <td align="center" bgcolor="#ffffff" height="28" width="16%"><a href="op.php?op=agent&fp=betlist1&dt1={dt}&dt2={dt}&bettype=36&page=-1&order=2&numbers=31">{money31}</a>&#12288;(&nbsp;{win31}&nbsp;)</td>
      <td align="center" bgcolor="#ffffff" height="28" width="16%"><a href="op.php?op=agent&fp=betlist1&dt1={dt}&dt2={dt}&bettype=36&page=-1&order=2&numbers=41">{money41}</a>&#12288;(&nbsp;{win41}&nbsp;)</td>
      <td align="center" bgcolor="#ffffff" height="28" width="16%"><a href="op.php?op=agent&fp=betlist1&dt1={dt}&dt2={dt}&bettype=36&page=-1&order=2&numbers=51">{money51}</a>&#12288;(&nbsp;{win51}&nbsp;)</td>
    </tr>
  </table>
  <table cellSpacing="2" cellPadding="2" width="900" border="0" class=table0>
    <tr> {table_head} </tr>
    <tr> {table_body} </tr>
  </table>
  <br>
  <table width="680"  cellpadding=1 cellspacing=2 border=1>
    <tr>
      <td class=td5 align=center nowrap>&nbsp;连尾走飞&nbsp;</td>
      <td nowrap>&nbsp;&nbsp;金额
        <input name=b63 value="{b63}" size=8>
        &#12288;
        <input {startnowdisable} type=submit value="走飞">
        &#12288;
        <input type=reset value="清除">
        &#12288;&#12288;&#12288;&#12288;&#12288;
        <input type=button value="资料刷新" onclick='location.reload()'>
        &#12288;&#12288;&#12288;&#12288;&#12288;&#12288;&#12288;
        <input type=button value="走飞资料查询" onclick=prot_list8() onmouseout="this.style.color='';" onmouseover="this.style.color='#0CDDFF';"></td>
    </tr>
  </table>
  <br>
  <b>※ </b>请先选择类别，再勾选尾数！<br>
</form>
<script>
var _nt21 = {money21};
var _nt31 = {money31};
var _nt41 = {money41};
var _nt51 = {money51};
var _at21 = {max_rate_21};
var _at31 = {max_rate_31};
var _at41 = {max_rate_41};
var _at51 = {max_rate_51};

function chkform(f)
{
  var typecheck = 0;
	var numscount = 0;
	var ratecheck = 0;
	var cc = "";
	var numbers = "";
	var xx = 0;
  for (i=0; i<f.subid.length; i++) {
      if (f.subid[i].checked) {
          typecheck = 1;
    			ratecheck = f.subid[i].value;
      }
  }
  if (typecheck==0) {
     alert("请先选择类别！");
	   return false;
  }
  for (i=0; i<10; i++) {
    temp = "num_"+i;
		if (f.all[temp].checked) {
			if (numscount > 0) { numbers+=","; }
			numbers += i+"尾";
			numscount++;
		}
	}
	var _num = ratecheck.substring(0,1);
	if (numscount == 0) {
		alert("请选择 " + _num + " 个尾数！");
		return false;
	} else if (numscount < _num) {
		alert("必需选择 " + _num + " 个尾数！");
		return false;
	} else if (numscount > _num) {
		alert("只能选择 " + _num + " 个尾数！");
		return false;
	}
	if (ratecheck == 21) {
		xx = _at21 * 1.6;
		cc = "二尾";
		if (f.b63.value-0 > _nt21) {
			alert("走飞金额不可大於「二尾」的下注金额！");
			return false;
		}
	} else if (ratecheck == 31) {
		xx = _at31 * 1.6;
		cc = "三尾";
		if (f.b63.value-0 > _nt31) {
			alert("走飞金额不可大於「三尾」的下注金额！");
			return false;
		}
	} else if (ratecheck == 41) {
		xx = _at41 * 1.6;
		cc = "四尾";
		if (f.b63.value-0 > _nt41) {
			alert("走飞金额不可大於「四尾」的下注金额！");
			return false;
		}
	} else if (ratecheck == 51) {
		xx = _at51 * 1.6;
		cc = "五尾";
		if (f.b63.value-0 > _nt41) {
			alert("走飞金额不可大於「五尾」的下注金额！");
			return false;
		}
	}

	if (f.b61.value-0 <= 0) {
        alert("赔率不可为 0.");
		return false;
  } else if (f.b61.value-0 > xx) {
        alert("不合理的赔率数值！");
		return false;
	}
	if (f.b62.value-0 > 15) {
        alert("不合理的退水数值！");
		return false;
  }
	if (f.b63.value-0 <= 0) {
        alert("走飞金额不可为 0.");
		return false;
    }
	if (!confirm("连尾走飞内容\n——————————\n"+cc+" @ "+(f.b61.value-0)+"\n"+numbers+"\n——————————\n金额 "+(f.b63.value-0)+" \n\n是否确定走飞？")) {
		return false;
	}
}

function prot_list8()
{
	var X = (screen.width-700)/2;
	var Y = (screen.Height-424)/2;
	var newwin = window.open("op.php?op=agent&fp=protlists&bmd=10",'WinPopList','menubar=no,status=yes,scrollbars=no,toolbar=no,top='+Y+',left='+X+',width=700,height=424');
}

function nowdate()
{
	document.all.hktime.innerHTML = "香港时间：<b>"+now.getDate()+"日"+d2(now.getHours())+":"+d2(now.getMinutes())+":"+d2(now.getSeconds())+"</b>";
	now.setTime(now.getTime() + 1000);
	setTimeout("nowdate()",1000);
}

function countdown()
{
	var str = "<font color=red><b>已经截止下注！</b></font>";
	if (timestap >= 0) {
		timediff = timestap;
		days = Math.floor(timediff / (60 * 60 * 24));
		timediff -= days * (60 * 60 * 24);
		hours = Math.floor(timediff / (60 * 60));
		timediff -= hours * (60 * 60);
		mins = Math.floor(timediff / (60));
		timediff -= mins * (60);
		secs = Math.floor(timediff);
	
		str = "距离截止下注时间还有 ";
		if (days > 0 ) str += "<b>" + days + "</b> 天 ";
		if (hours > 0) str += "<b>" + hours + "</b> 小时 ";
		if (mins > 0) str += "<b>" + mins + "</b> 分钟 ";
		str += "<b>" + secs + "</b> 秒 ";
		timestap-=1;
	}
	countdownstr.innerHTML =  str;
	setTimeout("countdown()",1000)
}

var timestap = {timestap};
var now = new Date(1000 * {phptime});

nowdate();
countdown();

</script>